# -*- coding:utf-8 -*-
"""
@Time:  2024/6/17 9:18
@Auth:  Mrs.Gou 
@Function:  请输入模块功能描述
"""


# from class05.my_sort import q_sort, mao_pao, xuan_ze
#
# height = [155, 187, 172, 160, 163, 166, 173, 182, 165, 159]

# mao_pao(height)
# xuan_ze(height)
# q_sort(height, 0, len(height) - 1)
# print(height)


# 作业2
def hui_wen(s: str):
    """
    判断字符串是否是回文字符串
    :param s:目标字符串
    :return:如果是，返回字符串相反的两部分，不是返回False
    """
    # s = 'abcba'
    # s = 'abba'
    # 回文字符串；倒过来和原字符串一模一样
    if s and s == s[::-1]:
        # 这是回文字符串
        if len(s) % 2 == 1:
            # 奇数长度，中间的字符串取两次
            return s[0:len(s) // 2 + 1], s[len(s) // 2:]
        else:
            # 偶数长度，刚好是两半
            return s[0:len(s) // 2], s[len(s) // 2:]
    else:
        # 不是返回False
        return False


# 边界值 等价类测试
# s = 'abcba'
# s = 'abba'
s = 'acas'
print(hui_wen(s))
